package com.wyz.saas.common.room

import androidx.room.ColumnInfo
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.wyz.saas.common.room.converter.DateToLongConverter
import java.util.*

abstract class AbstractBaseEntity {

    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    var id: Int? = null

    @ColumnInfo(name = "uuid")
    var uuid: String = UUID.randomUUID().toString()

    @TypeConverters(DateToLongConverter::class)
    var createAt: Date = Date()// 创建时间

    @TypeConverters(DateToLongConverter::class)
    var updateAt: Date = Date()// 更新时间

}